/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.group4.highschoolportal.student.backingbean;

import com.group4.controller.GradeFacade;
import com.group4.entity.Grade;
import java.util.List;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

/**
 *
 * @author José
 */
@ManagedBean
@RequestScoped
public class StudentGradesBackingBean {
    
    @EJB
    private GradeFacade gradesDb;
    
    private List<Grade> grades;

    /** Creates a new instance of StudentCoursesBackingBean */
    public StudentGradesBackingBean() {
            
    }

    public void setGrades(List<Grade> grades) {
        this.grades = grades;
    }

    public List<Grade> getGrades() {
        grades = gradesDb.findAll();
        return grades;
    }
}
